import fetch from '@/utils/fetch';


// 说明：添加消息事件
// 接口：api/cb/flNewEvent
// 请求类型：Post
export function addFlNewEvent(obj) {
    return fetch({
        url: 'api/admin/flNewEvent',
        method: 'post',
        data: obj
    });
}

// 说明：删除消息事件
// 接口：api/cb/flNewEvent/{ids}
// 请求类型：Delete
export function deleteFlNewEvent(idArr) {
    return fetch({
        url: 'api/admin/flNewEvent/' + idArr,
        method: 'delete'
    });
}

// 说明：修改消息事件
// 接口：api/cb/flNewEvent/{id}
// 请求类型：Put
export function modifyFlNewEvent(id, obj) {
    return fetch({
        url: 'api/admin/flNewEvent/' + id,
        method: 'put',
        data: obj
    })
}

// 说明：消息事件分页查询(条件搜索)
// 接口：api/cb/flNewEvent/search/{page}/{size}
// 请求类型：Post
export function searchFlNewEvent(page, size, obj) {
    return fetch({
        url: 'api/admin/flNewEvent/search/'+ page +'/'+ size,
        method: 'post',
        data: obj
    });
}

// 说明：获取单个消息事件
// 接口：api/cb/flNewEvent/{id}
// 请求类型：get
export function getFlNewEvent(id) {
    return fetch({
        url: 'api/admin/flNewEvent/' + id,
        method: 'get'
    })
}

// 说明：消息事件导出Excel模板
// 接口：api/cb/flNewEvent/exprotExcelModel
// 请求类型：get
export function downTem() {
return fetch({
url: 'api/admin/flNewEvent/exprotExcelModel',
responseType: 'blob',
method: 'get'
})
}

// 说明：消息事件导出Excel数据
// 接口：api/cb/flNewEvent/exprotXls/{ids}
// 请求类型：post
export function exprotXls(obj, ids) {
return fetch({
url: 'api/admin/flNewEvent/exprotXls/' + ids,
responseType: 'blob',
method: 'post',
data: obj
})
}

// 说明：消息事件导入
// 接口：api/cb/flNewEvent/importXls
// 请求类型：post
export function importXls() {
return fetch({
url: 'api/base/flNewEvent/importXls',
method: 'post'
})
}
